﻿using System;
using System.Collections.Generic;
using System.Text;
using TransportAbstractionLibrary.UDP;
using TransportAbstractionLibrary.Common.BufferPool;

namespace UDPServerTest
{
    class UDPEchoServer : UDPServer
    {
        public UDPEchoServer(int port, BufferManager bufferManager) : 
            base(port, bufferManager)
        {
        }

        protected override void InboundConnection(TransportAbstractionLibrary.IProtocolLowerLayer connection)
        {
            Console.WriteLine("Client connected!");
            EchoConnection echoConnection = new EchoConnection();
            connection.Bind(echoConnection);
        }
    }
}
